<ion-view id="addresses" class="addr" hide-tabs>
  <ion-nav-bar class="bar-royal">
    <ion-nav-title>{{'All Addresses' | translate}}</ion-nav-title>
    <ion-nav-back-button>
    </ion-nav-back-button>
  </ion-nav-bar>

  <ion-content>
    <div class="addr-list list">
      <div class="item item-divider"></div>

      <div ng-if="loading" class="updating">
        <ion-spinner class="spinner-dark recent" icon="crescent"></ion-spinner>
        <span translate>Loading addresses...</span>
      </div>

      <div ng-show="isCordova && allAddresses[0]">
        <div class="item view-all" ng-click="sendByEmail()">
          <span translate>Send addresses by email</span>
        </div>

        <div class="item item-divider"></div>
      </div>

      <div class="item" ng-repeat="a in allAddresses track by $index" copy-to-clipboard="a.address">
        {{a.address}}
        <div class="addr-path" ng-if="!a.balanceStr">
          {{a.path}} {{a.createdOn * 1000 | amDateFormat:'MMMM Do YYYY, hh:mm a'}}
        </div>
        <div class="addr-balance" ng-if="a.balanceStr">{{a.balanceStr}}</div>
      </div>

      <div class="item item-divider"></div>
    </div>
  </ion-content>
</ion-view>
